<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="Admin.AdminDeal" %>
<%@ page import="java.sql.*"%>
<script  language="javascript">
<!-- Begin validation script  
function checkForm(){
	    if(document.form1.AdmID.value==""){
		alert("请输入管理员编号！");
		return false;
		}
	    if(document.form1.AdmKey.value==""){
		alert("请输入管理员密码！");
		return false;
		}
		if(document.form1.AdmTel.value=="")
		{
			alert("输入管理员电话！");
		    return false;
		}
	
	return true;
	}
-->
</script>
<html>
  <head>
    <title>修改商品信息</title>
  </head>
  
  <body>
  <%

  String DealID=request.getParameter("DealID");
  AdminDeal Admin=new AdminDeal();
  ResultSet rs=Admin.CalAdmin(DealID);
  if(rs.next())
  {
	
	  Admin.setAdmID(rs.getString(1));
	  Admin.setAdmKey(rs.getString(2));
	  Admin.setAdmTrueName(rs.getString(3));
	  Admin.setAdmBirthday(rs.getString(4));
	  Admin.setAdmSex(rs.getString(5));
	  Admin.setAdmTel(rs.getString(6));
	  Admin.setAdmEmail(rs.getString(7));
  }
 
  %>
  <FORM METHOD="POST" ACTION="SaveAdminModify.jsp?DealID=<%=Admin.getAdmID()%>" onSubmit="return checkForm()">
	 <table width="90%" border="0" cellspacing="1" cellpadding="0" align="center">
	 <tr> 
      <td width="20%" align="right">管理员编号：</td>
      <td width="80%" > 
        <input type="text" name="AdmID" size="30" value=<%=Admin.getAdmID()%>>
        * </td>
    </tr>
    <tr> 
      <td width="20%" align="right">管理员密码：</td>
      <td width="80%" > 
        <input type="text" name="AdmKey" size="30" value=<%=Admin.getAdmKey()%>>
        * </td>
    </tr>
    <tr> 
      <td width="20%" align="right">真实姓名：</td>
      <td width="80%" > 
        <input type="text" name="AdmTrueName" size="30" value=<%=Admin.getAdmTrueName()%>>
        </td>
    </tr>
    <tr>
      <td width="20%" align="right">出生年月：</td>
      <td width="80%" > 
      <input type="text" name="AdmBirthday" size="30" value=<%=Admin.getAdmBirthday()%>>
       例：1991-01-01</td>
    </tr>
   <tr> 
      <td width="20%" align="right">性别：</td>
        <td width="80%" > 
        <SELECT id=typeId style="WIDTH: 110px" name="AdmSex"> 
         <option   value='1' <%if(Admin.getAdmSex().equals("1")){out.print("selected");}%> >男</option>  
         <option   value=‘0' <%if(Admin.getAdmSex().equals("0")){out.print("selected");}%>>女</option>   
        </SELECT> 
         </td>
    </tr>
    <tr> 
      <td width="20%" align="right" >电话：</td>
      <td width="80%" > 
        <input type="text" name="AdmTel" size="30" value=<%=Admin.getAdmTel()%>>
        * </td>
    </tr>
    
    <tr> 
      <td width="20%" align="right">邮箱：</td>
      <td width="80%" > 
        <input type="textarea" name="AdmEmail" size="30" value=<%=Admin.getAdmEmail()%>>
        </td>
    </tr>
	  </table>
	<table width="366" border="0" cellspacing="2" cellpadding="0" align="left">
	
	    <tr align="left"> 
	      <td colspan="2" height="12" align="right"> 
	        <input type="submit" value="提交">
	      </td>
	      <td colspan="2" height="12" align="center"> 
	        <input type="reset" value="重置">
	      </td>
	    </tr>
	  </table>
	</FORM>
  </body>
</html>